<%-- 
    Document   : UpdateDirectoryCategory
    Created on : Nov 14, 2011, 4:28:08 PM
    Author     : home
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="Admin.Model.DirectoryCategory,java.util.ArrayList" %>
<%@page  import="Admin.DAO.DirectoryCategoryDAO" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" media="screen, projection" href="menu.css" />
        <link rel="stylesheet" type="text/css" media="screen, projection" href="style.css" />
        <title>Update Directory Category</title>
    </head>
    <body>

        <%
                    DirectoryCategoryDAO categoryDao = null;
                    DirectoryCategory category = null;
                    if (request.getParameter("categoryid") != null) {
                        int categoryid = Integer.parseInt(request.getParameter("categoryid"));
                        categoryDao = new DirectoryCategoryDAO();
                        category = categoryDao.GetByID(categoryid);
                    }


        %>

        <div class="wrap1">
            <div class="wrap2">
                <div class="logo" style="height: 110px; padding-top:  0px; ">
                    <img src="img/logo.png"/> My Sweet Home ltd.
                </div>
                <div id="menu">
                    <div class="menu">
                        <ul>
          <li><span class="hlavny_"><a href="index.jsp">Home</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewRealEstate.jsp">Real Estate</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="viewSeller.jsp">User</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewPostHistory.jsp" >Post Histories</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewBank.jsp">Banks</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewDirectory.jsp">Directories</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewFAQs.jsp">FAQ</a></span></li>
          <li><img src="img/divider2.png" alt="" /></li>
          <li><span class="hlavny_"><a href="ViewFeedback.jsp">Feedback</a></span></li>
        </ul>
                    </div>
                    <div class="info">
        <%
                if (request.getSession().getAttribute("admin") != null) {
                    String userEmail = request.getSession().getAttribute("admin").toString();
                    out.print("<h4 style=\"color:#FF3300\">Welcome, "+userEmail + "  <a href=\"../Logout\" onclick=\" return confirm('Are u sure?')\" > Logout </a></h4>  ");
                } else {
                    response.sendRedirect("adminLogin.jsp");
                }

        %> 
                    </div>
                    <div class="leftpanel">
                         <div class="mn_header_left"></div>
        <div class="mn_header_center">Admin Management</div>
        <div class="mn_header_right"></div>
        <div class="mn_content_center"><a href="ViewDirectory.jsp"><br/>&nbsp; &nbsp; View Directory</a></div>
         <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="AddDirectory.jsp"><br/>&nbsp; &nbsp; Add Directory</a></div>
         <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewDirectoryService.jsp"><br/>&nbsp; &nbsp; Directory Service</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewDirectoryCategory"><br/>&nbsp; &nbsp; Directory Category</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewRealEstate.jsp"><br/>&nbsp; &nbsp; Real Estate</a></div>
        <div class="mn_content_right"></div>
       <div class="mn_content_center"><a href="ViewPostHistory.jsp"><br/>&nbsp; &nbsp; Post History</a></div>
        <div class="mn_content_right"></div>
       <div class="mn_content_center"><a href="ViewBank.jsp"><br/>&nbsp; &nbsp; Banks</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewFAQs.jsp"><br/>&nbsp; &nbsp; FAQ</a></div>
        <div class="mn_content_right"></div>
        <div class="mn_content_center"><a href="ViewFeedback.jsp"><br/>&nbsp; &nbsp; Feedback</a></div>
        <div class="mn_content_right"></div>

        <div class="mn_footer_left"></div>
        <div class="mn_footer_content"></div>
        <div class="mn_footer_right"></div>
<!--                        <div class="header">Admin Management</div>
                        <ul id="categories">
                            <li><a href="ViewDirectory.jsp">View Directory</a></li>
                            <li><a href="AddDirectory.jsp">Add New Directory</a></li>
                            <li><a href="ViewDirectoryService.jsp">View Directory Service</a></li>
                            <li><a href="ViewDirectoryCategory">View Directory Category</a></li>
                            <li><a href="ViewRealEstate.jsp">Real Estate</a></li>
                            <li><a href="ViewPostHistory.jsp">Post Histories</a></li>
                            <li><a href="ViewBank.jsp">Banks</a></li>
                            <li><a href="ViewFAQs.jsp">FAQ</a></li>
                             <li><a href="ViewFeedback.jsp">Feedback</a></li>
                        </ul>-->
                    </div>
                    <div id="content">
                    <div id="ad_header_left"></div>
                    <div id="ad_header_center"></div>
                    <div id="ad_header_right"></div>
                    <div class="ad_content_center">
                       <form action="../updateDirectoryCategory" method="post">
                           <table width="650" height="400" border="0" align="center" class="tb_con">
                            <tr>
                                <td width="128" scope="col"><span style="color: white;">Directory Category ID:</span></td>
                                <td width="256" scope="col"><input type="hidden" name="directoryCategoryID" value="<%=category.getDirectoryCategoryID() %>"/><%=category.getDirectoryCategoryID() %></td>

                            </tr>
                            <tr>
                                <td width="128" scope="col"><span style="color: white;">Directory Category Name:</span></td>
                                <td width="256" scope="col"> <input type="text" name="directory_categoryName" width="200" value="<%=category.getDirectory_categoryName() %>" />  </td>
                            </tr>
                            <tr>
                                <td width="128" scope="col"><span style="color: white;">Status:</td>
                                <td width="256" scope="col">
                                    <% if(category.getDiCategoriesStatus() ==1){ %>
                                    <label> <input type="radio" name="Status" vavalue="1" checked /> <span style="color: white;">Active</span></label>
                                    <br /> <label> <input type="radio" name="Status" value="0" /> <span style="color: white;">Inactive</span></label>
                                    <% }else { %>
                                    <label> <input type="radio" name="Status" value="1" /> <span style="color: white;">Active</span></label>
                                    <br /> <label> <input type="radio" name="Status" value="0"  checked/><span style="color: white;"> Inactive</span></label>
                                 <% } %>

                                </td>
                            </tr>

                            <tr>
                                <td>&nbsp;</td>
                                <td>
                                    <input type="submit" name="Update" value="Update" />
                                    <a href="ViewDirectoryCategory.jsp"><input type="button" name="Back" value="Back" /></a>
                                </td>
                            </tr>
                        </table>
                    </form>
                    </div>
                    <div id="ad_footer_left"></div>
                    <div id="ad_footer_center"></div>
                    <div id="ad_footer_right"></div>
                </div>

                <div class="cleaner_with_height"> </div>
                <div class="text_"> <strong>My Sweet Home ltd.</strong><br />
                    <br />
                    212 Military Parkway<br />
                    Los Angeles, CA 94043  Telephone: +421 903 000 000<br />
                    E-mail: e-mail@domain.com<br />
                    ICQ: 000-000-000<br />
                    Skype: corporation1<br />
                    <br />
                </div>
                    
                </div>
            </div>
<div class="info1" style="height: 80px;">
                                        <div style="display:inline; float:left;">&copy; 2011 <a href="index.jsp">mysweethome.com</a>. Design by <a href="">Group 106 </a>.</div>
                                        <div style="display:inline; float:right;"><a href="http://aptech.vn">Ha Noi - Aptech</a></div>
                                    </div>
        </div>

    </body>
</html>
